package com.sxkj.gis.ignite.service.impl;

import javax.servlet.http.HttpSession;

import org.apache.ignite.Ignite;
import org.springframework.stereotype.Service;

import com.sxkj.gis.ignite.client.IgniteClient;
import com.sxkj.gis.ignite.service.UserToIgniteServerService;

@Service("userToIgniteServer")
public class UserToIgniteServerServiceImpl implements UserToIgniteServerService {
	@Override
	public void getConnectIgniteServer(HttpSession session) {
		Boolean flog = true;
		try{
			Ignite igniteClient = (new IgniteClient()).StartClient();
			session.setAttribute("clientGridName", igniteClient.name());
			session.setAttribute("flog", flog);
		}
		catch(Exception e){
		flog=false;
		session.setAttribute("flog", flog);
		System.out.println("客户端未连接到服务端！getMap将由客户端自行处理。。。。。。");
		
	}
	}
}
